﻿using LPP.Core.Dtos;
using LPP.Entity.Work;
using LPP.EntityFrameworkCore;
using System;

namespace LPP.Repository.WorkerRepository
{
    public class WorkerRepository : IWorkerRepository
    {
        private readonly SqlDbContext _context;

        public WorkerRepository(SqlDbContext context)
        {
            _context = context;
        }

        public async Task AddWorkerAsync(Worker worker)
        {
            await _context.Workers.AddAsync(worker);
            await _context.SaveChangesAsync();
        }
    }
}
